﻿using System;

namespace WFIM.Framework.Parellel
{
  /// <include file='XMLCodeDocumentation.xml' path='documentation/item[@name="T_ParallelState"]/*' />
  public class ParallelState
  {
    //-----------------------------------------------------------------------
    // FIELDS
    //-----------------------------------------------------------------------
    /// <summary>Contains the exception which ocurred during task execution. Or <c>null</c> when no exception ocurred.</summary>
    public  Exception taskException = null;

    //-----------------------------------------------------------------------
    // CONSTRUCTORS
    //-----------------------------------------------------------------------

    //-----------------------------------------------------------------------
    // METHODS
    //-----------------------------------------------------------------------
    /// <summary>Examines if an exception has ocurred during execution of the task.</summary>
    /// <returns>Returns <c>true</c> if an exception has ocurred.</returns>
    public bool taskExceptionOccurred()
    {
      return (taskException != null);
    }

    //-----------------------------------------------------------------------
  }
}
